<template>
	<view class="flex align-center p-2 border-bottom" hover-class="text-secondary" @click="openSpace">
		<image :src="item.avatar" class="rounded-circle mr-2" style="height: 100rpx; width: 100rpx;"></image>
		<view class="flex-1 flex flex-column justify-between">
			<view class="font-md">
				{{item.username}}
			</view>
			<view>
				<uni-badge class="uni-badge-left-margin" :text="item.age" :type="item.sex===1 ? 'primary' : 'error'">
					<!-- <text class="iconfont   mr-1 font-sm" v-if="item.sex > 0" :class="item.sex===1 ? 'icon-nan' : 'icon-nv'"></text> -->
				</uni-badge>
			</view>
		</view>
		<!-- 是否关注 -->
		<view class="uni-icon uni-icon-checkbox-filled font" :class="item.isFollow ? ' text-light-muted' : 'text-main'">								
		</view>
	</view>
</template>

<script>
	import uniBadge from'@/components/uni-ui/uni-badge/components/uni-badge/uni-badge.vue'
	export default{
		props:{
			item:Object,
			index:Number
		},
		components:{
			uniBadge
		},
		methods:{
			//打开个人中心
			openSpace(){
				uni.navigateTo({
					url: '../user-space/user-space?user='+JSON.stringify(this.item),
				});
			}
		}
	}
</script>

<style>
</style>
